1. Field of the Invention
This invention relates to the field of computer server program administration. Specifically, this invention is a method, apparatus and computer program product for dynamic administration, management and monitoring of daemon programs executing within a computer.
2. Background
Most computer operating systems include a mechanism for executing server programs. These server-programs are used to provide services to other, possibly networked, client-programs. These server-programs generally do not interact with a user. Instead, a client-program requests the server-program to perform an operation. The server-program performs the requested operation and generally returns a result to the client-program. These server-programs are commonly referred to as xe2x80x9cdaemonxe2x80x9d programs and are subsequently defined. The daemon program is often invoked when the operating system initializes. When the daemon program starts execution, it may access command line options and/or read a preference or initialization file to further configure its operation. Daemon programs often provide services that are similar to operating system services. One example of a daemon program is a program that provides file opening and closing services for file resources. Another example of a daemon program is an HTTP server program that provides World Wide Web (WWW) page services for web page resources over the Internet.
FIG. 1A illustrates a prior art daemon architecture, indicated by general reference character 100, for providing services for one or more resources. This example uses an HTTP server daemon program 101 within the prior art daemon architecture 100. The HTTP server daemon program 101 accesses a preference file 103 to obtain information about the resources that it serves. The prior art daemon architecture 100 also includes a connection to a network 105. The communication through the network may be, but need not be, totally contained within the computer hosting the HTTP server daemon program 101. The HTTP server daemon program 101 provides service for multiple WWW domains. These include a first served web site 107, a second served web site 109 and a third served web site 111. In this example, each of the WWW domains is a resource served by the HTTP server daemon program 101.
One problem with prior art daemon programs is that they are generally designed to begin execution soon after the computer""s operating system is booted and to continue execution until the computer is shutdown. Thus, if the operating characteristics for the daemon program change from the characteristics specified when the daemon program initiated, the daemon program must be terminated and restarted with the new characteristics. Between the time the daemon program terminates and the time the restarted daemon program is initialized, the service provided by the daemon program is unavailable. Thus, performing administrative functions on the daemon program effects the availability of the services for the resources provided by the daemon program. Such administrative functions include (without limitation) reconfiguration of the daemon program, performance tuning of the daemon program, and performance monitoring of the daemon program.
FIG. 1B illustrates a prior art daemon re-initialization process, indicated by general reference character 150, used to change the characteristics of a daemon program. The prior art daemon re-initialization process 150 initiates at a xe2x80x98startxe2x80x99 terminal 151 and continues to a xe2x80x98daemon program invocationxe2x80x99 step 153. As was previously described, the daemon program can be invoked by a system administrator who may specify invocation options. Once the daemon program is invoked, it initializes itself (possibly using command line options and/or information contained in a preference file) and provides services at a xe2x80x98first daemon program executionxe2x80x99 step 155. The administrator then decides to change the operation of the daemon program. To do so, the system administrator edits the preference file if required (if the desired changes can be accomplished simply by changing startup options this step is not necessary) at an xe2x80x98edit preferencesxe2x80x99 step 157. Next, the system administrator initiates a xe2x80x98terminate daemon programxe2x80x99 step 159 that terminates the daemon program. Once the daemon program terminates, the services for the resources provided by the daemon program are no longer available to client-programs. Next, at a xe2x80x98daemon program re-invocationxe2x80x99 step 161, the system administrator restarts the daemon program using different command line options and/or the preference file edited by the xe2x80x98edit preferencesxe2x80x99 step 157. Thus, a xe2x80x98second daemon program executionxe2x80x99 step 163 begins execution using the new options and/or preference file and so operates differently than the xe2x80x98first daemon program executionxe2x80x99 step 155. The prior art daemon re-initialization process 150 completes at an xe2x80x98endxe2x80x99 terminal 165.
Some daemon programs provide services for multiple resources. One example of such a daemon program is an HTTP daemon program. For example, a typical HTTP daemon program supports multiple WWW sites. If the execution of the HTFP server daemon program is terminated to modify a parameter for one of the served WWW sites (for example, by using the process of FIG. 1B), service for all the served WWW sites will be interrupted until the HTTP daemon program is restarted.
These daemon programs need a more efficient mechanism to allow an administrator to control the operation of the daemon programs. For example, a WWW server administrator needs the ability to change access control options, to enable particular domains and to gather data for monitoring the performance of the daemon program. In the prior art, the daemon program generally stores performance and status information in a file. The administrator often needs to terminate the daemon program to get access to all the information in the file.
Thus, one problem is that the administration of daemon programs causes interruptions to the services for resources provided by the daemon programs. This service interruption affects the users of programs served by the daemon programs. This service interruption also generally requires administration of the daemon programs to be performed when the daemon programs are least utilizedxe2x80x94generally at times that are inconvenient to the administrator.
It would be advantageous to provide a method, apparatus and program product that allow administration of a daemon program without requiring that the daemon program be completely disabled during the administration process. Such an invention improves the performance of computer systems by reducing the amount of time that services to resources are unavailable because of administrative functions.
The present invention improves the administration of daemon programs by providing a mechanism to perform administrative functions on the daemon programs without terminating the services provided by the daemon programs to the serviced resources.
One aspect of the invention is a computer controlled method for dynamically performing a control operation on a daemon program. The daemon program provides a service for one or more resources. The method includes the step of registering the daemon program with an inter-process communication mechanism. Another step is that of connecting a service agent program to the daemon program using the inter-process communication mechanism. The method also sends a message from the service agent program to the daemon program using the inter-process communication mechanism. Yet another step is that of processing the message by the daemon program performing the control operation.
Another aspect of the invention is an apparatus, having a central processing unit (CPU) and a memory coupled to the CPU, for dynamically performing a control operation on a daemon program. The daemon program provides a service for a one or more resources. The apparatus includes a registration mechanism that is configured to register the daemon program with an inter-process communication mechanism. It also includes a connection mechanism that is configured to connect the service agent program to the daemon program using the inter-process communication mechanism. The apparatus also includes a message mechanism that is configured to send a message from the service agent program to the daemon program using the inter-process communication mechanism. In addition, the apparatus includes a processing mechanism that is configured to process the message by the daemon program.
Yet a further aspect of the invention is a computer program product embodied on a computer usable medium for causing a computer to dynamically perform a control operation on a daemon program. The daemon program provides a service for one or more resources. When executed on a computer, the computer readable code causes a computer to effect a registration mechanism, a connection mechanism, a message mechanism and a processing mechanism. Each of these mechanisms having the same functions as the corresponding mechanisms for the previously described apparatus.
An additional aspect of the invention is computer program product embodied in a carrier wave. The carrier wave transmits computer readable code therein for causing a computer to dynamically perform a control operation on a daemon program. The daemon program provides a service for one or more resources. When executed on a computer, the computer readable code causes a computer to effect a registration mechanism, a connection mechanism, a message mechanism and a processing mechanism. Each of these mechanisms having the same functions as the corresponding mechanisms for the previously described apparatus.
The foregoing and many other aspects of the present invention will no doubt become obvious to those of ordinary skill in the art after having read the following detailed description of the preferred embodiments that are illustrated in the various drawing figures.